<!--
 * @Author: gongjiuhui
 * @Date: 2022-04-08 10:55:53
 * @LastEditTime: 2022-04-11 16:52:04
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \jk_one-stop_cloud_mobile_v1.0\src\views\dashboard\topbox.vue
-->
<template>
  <div class="dashBoard-topBox">
    <div class="title">流程审批</div>
    <div class="operation">
      <div
        class="group"
        v-for="(item, index) in topArray"
        :key="index"
        @click="goNextPage(item)"
      >
        <span class="top">{{ item.number }}</span>
        <span class="bottom">{{ item.title }}</span>
      </div>
    </div>
  </div>
</template>
<script>
import { getAction, uploadAction, postAction } from "@/api/manage";
import { apiBaseUrlDownload, apiBaseUrlUpload } from "@/utils/request";
import { ImagePreview } from "vant";
export default {
  created() {},
  props: {
    formdata: {
      type: Object,
      default() {
        return {};
      },
    },
    topArray: Array,
  },
  data() {
    return {
      // topArray: [
      //   {
      //     title: "待我审批",
      //     number: "",
      //     applyType: "waiterDeal",
      //   },
      //   {
      //     title: "已审批",
      //     number: "",
      //     applyType: "alreadyDeal",
      //   },
      //   {
      //     title: "已发起",
      //     number: "",
      //     applyType: "alreadyLaunch",
      //   },
      //   {
      //     title: "我收到的",
      //     number: "",
      //     applyType: "copyToMe",
      //   },
      // ],
    };
  },

  created() {},
  methods: {
    goNextPage(item) {
      let pathUrl = "/waiterApply";
      // if (item.applyType == 'waiterDeal') {
      //   pathUrl = "/waiterApply"
      // } else {
      //   pathUrl = "/otherApply"
      // }
      let paramsObj = {
        applyType: item.applyType,
      };

      this.$router.push({
        path: pathUrl,
        query: paramsObj,
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.dashBoard-topBox {
  background: #ffffff;
  margin-top: 20px;
  padding: 32px;
  .title {
    // width: 0.55rem;
    height: 28px;
    font-size: 28px;
    font-family: PingFang SC;
    font-weight: 400;
    color: #888888;
    // margin-top: 0.16rem;
  }
  .operation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    .group {
      display: flex;
      flex-direction: column;
      align-items: center;
      // border: 1px solid red;
      text-align: left;
      .top {
        font-size: 40px;
        font-family: PingFang SC;
        font-weight: 500;
        color: #191f25;
      }
      .bottom {
        font-size: 24px;
        font-family: PingFang SC;
        font-weight: 400;
        color: #888888;
      }
    }
  }
}
</style>
